package cn.ycms.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.transaction.annotation.Transactional;



import cn.ycms.bean.GrouManager;
import cn.ycms.bean.GrouReso;
import cn.ycms.dao.bean.GrouManagerDao;
import cn.ycms.service.GrouManagerService;
import cn.ycms.utils.StringUtils;
import cn.ycms.utils.datebean;

/**
 * 
 * @author ������
 * @date 2011-3-19����11:50:51
 * @version 1.0
 */
@Transactional
public class GrouManagerServicei  extends ServiceUtil<GrouManager> implements GrouManagerService{
public List<GrouManager> GetEntitybyPage(Map<String, Object> parms,
			datebean datebean, int Start, int limit) {
		// TODO Auto-generated method stub
		return null;
	}
@Resource GrouManagerDao grouManagerDao;
/**
 * ��������õ�ȫ���б?��
 */

public List<GrouManager> GetEntitybyCond(Map<String, Object> parms) {
	// TODO Auto-generated method stub
	return grouManagerDao.queryByParams(parms);
}

public GrouManager GetEntitybyId(String id) {
	// TODO Auto-generated method stub
	return grouManagerDao.findById(id);
}

public List<GrouManager> GetEntitybyPage(Map<String, Object> parms, int Start,
		int limit) {
	int start1=StringUtils.getPositiveInt(Start);
	int limit1=StringUtils.getPositiveInt(limit);
     return grouManagerDao.queryByParams(parms, start1, limit1);
      
}

public GrouManager GetFirstEntity() {
	// TODO Auto-generated method stub
	  return grouManagerDao.queryByParams(null, 1, 1).get(0);
}

public List<GrouManager> GetListAll() {
	// TODO Auto-generated method stub
	return grouManagerDao.loadAll();
}

public int UpdateEntity(GrouManager entity) {
	  grouManagerDao.update(entity);
	return 0;
}

public int UpdatelistEntity(List<GrouManager> list) {
	grouManagerDao.updatelist(list);
	return 0;
}

public void save(GrouManager entity) {
	grouManagerDao.saveOrUpdate(entity);
	
}

public void saveList(List<GrouManager> list) {
	grouManagerDao.save(list);
	
}

public String saveReturnId(GrouManager entity) {
	// TODO Auto-generated method stub
	return grouManagerDao.save(entity);
}
public void truedeletebyID(String id)
{
	grouManagerDao.removeById(id);
}
public void FalseDeleteByID(String id)
{ GrouManager grouManager=grouManagerDao.findById(id);
grouManager.setMark(0);
grouManagerDao.update(grouManager);
}
	
}
